var status = 0;
        var choice;
        var itemxh = new Array("1102823","1102874","1102972","1102932 ","1103003","1102450","1102451","1102452","1102546","1102548","1102547","1102873","1102572","1102466","1102624", "1102824","1102700","1102644", "1102698", "1102699", "1102907", "1102948", "1102949", "1102293", "1102604", "1102668","1102511", "1102349","1102729","1102611", "1102386", "1102487", "1102575", "1102630", "1102779", "1102643","1102730", "1102832");
        var itemxhcost = new Array("6000","10000","10000","10000","10000","12000","12000","12000","15000","15000","15000","15000","18000","18000","18000","18000","15000","15000","15000","15000","18000","13000","13000","12000","20000","20000","20000","20000","20000","20000","22000","","22000","25000","25000","25000","40000","40000","40000","40000","40000","40000");
        function start() {
        status = - 1;
                action(1, 0, 0);
        }

		function action(mode, type, selection) {
if (mode == - 1) cm.dispose();
        else {
        if (status == 0 && mode == 0) {
        cm.dispose();
                return;
        } else if (status >= 1 && mode == 0) {
        cm.sendOk("没关系想好了再下手~");
                cm.dispose();
                return;
        }
        if (mode == 1) status++;
                else status--;
                if (status == 0) {
        choices = "#e#r翅膀商店\r\n#rPS:#d#n请先清理背包否则后果自负,本商店使用作为货币交易物品哦~#r#e #n#b";
                for (var i = 0; i < itemxh.length; i++) {
        choices += "\r\n#b#L" + i + "##v" + itemxh[i] + "##z" + itemxh[i] + "#　#d需要#r" + itemxhcost[i] + "#dPPMS微积分#k#l";
        }
        cm.sendSimpleS("" + choices, 2);
        } else if (status == 1) {
        cm.sendGetNumber("你选择的商品为#b#v" + itemxh[selection] + "#售价为：" + itemxhcost[selection] + "PPMS微积分/个\r\n请输入你购买的数量", 1, 1, cm.getPlayerPoints());
                choice = selection;
        } else if (status == 2) {
        fee = selection;
                money = fee * itemxhcost[choice];
                if (fee < 0) {
        cm.sendOk("不能输入0.或者你没有足够的PPMS微积分支付你要买的数量.!");
                cm.dispose();
        } else if (cm.getPlayerPoints() < money) {
        cm.sendOk("购买失败，你没有" + money + "PPMS微积分");
                cm.dispose();
        } else {
        cm.gainPlayerEnergy( - money);
                cm.gainItem(itemxh[choice], fee);
     		    cm.worldSpouseMessage(0x19, "[翅膀商城] :" + cm.getChar().getName()+ " "+"使用PPMS微积分免费换取了稀有翅膀！");
                cm.sendOk("恭喜，购买成功");
                cm.dispose();
        }
        }
        }
}
